<?php

class Application_Form_NewZhuanTi extends Zend_Form
{

    public function init()
    {
        /* Form Elements & Other Definitions Here ... */
    	$this->setName('newZhuanti');
    	$parentId=new Zend_Form_Element_Text('parentId');
    	$parentId->setLabel('父id');
    	$parentId->setValue('0')->addFilter('StringTrim');
    	$title=new Zend_Form_Element_Text('title');
    	$title->setLabel('专题名称')->setAttrib('size', '50')
    		->setRequired(true)
    		->addFilter('StripTags')
    		->addFilter('StringTrim')
    		->addValidator('NotEmpty')
    		->addValidator('StringLength',false,array(0,30,'UTF-8'));
    	$url_spell=new Zend_Form_Element_Text('url_spell');
    	$url_spell->setLabel("url拼音")->setAttrib('size', '100')
    			  ->addFilter('StripTags')
    		      ->addFilter('StringTrim')
    		      ->addValidator('StringLength',false,array(0,100,'UTF-8'));
    	$key_words=new Zend_Form_Element_Text('key_words');
    	$key_words->setLabel("关键词")->setAttrib('size', '50')
    			  ->addFilter('StripTags')
    		      ->addFilter('StringTrim')
    		      ->addValidator('StringLength',false,array(0,50,'UTF-8'));
    	$description=new Zend_Form_Element_Text('description');
    	$description->setLabel("概要描述")->setAttrib('size', '120')
    	 		  ->addFilter('StripTags')
    		      ->addFilter('StringTrim')
    		      ->addValidator('StringLength',false,array(0,120,'UTF-8'));
    	$logo=new Zend_Form_Element_File('logo');
    	$logo->setLabel('专题图标');
    	$content_type=new Zend_Form_Element_Radio('type');
    	$content_type->setLabel("种类")
    				 ->setMultiOptions(array('0'=>"文章",'1'=>'图片','2'=>'商品','3'=>'专题类目'))
    				 ->setValue('0');
    	$content_type->setSeparator("");
    	$submit=new Zend_Form_Element_Submit("提交");
    	$this->addElements(array($parentId,$title,$url_spell,$key_words,$description,$logo,$content_type,$submit));
    	
    }


}

